<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>122-css-动画的基本使用.html</title>
	<style>
		*{
			margin: 0;
			padding: 0;
		}
		.box{
			width: 200px;
			height: 200px;
			background-color: red;
			/*transition: width 2s;*/
		}
		
		.box:hover{
			width: 600px;
		}
		.box1{
			width: 200px;
			height: 200px;
			background-color: skyblue;
			margin-top: 20px;
			animation-name: sport;
			animation-duration: 2s;
		}
		@keyframes sport{
			from{
				width: 200px;
			}
			to{
				width: 600px;
			}
		}
	</style>
</head>
<body>
	<div class="box"></div>
	<div class="box1"></div>
</body>
</html>